﻿@model SoftHotel.Models.DatoConsumo

@{
    ViewBag.Title = "Agregar2";
}

<h2>Agregar Detalles</h2>

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)
    <fieldset>
     <table  width="100%" rules="all" border="1" style="border-color: Black; width: 900px; margin-bottom: 0px;">
    <tr align="center">
        <th>
            Descripción
        </th>
        <th width="60px"></th>
    </tr>

@foreach (var item in Model) {
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.descripcion)
        </td>
        <td>
        <div  style="float:left">
            @using (Html.BeginForm("DatoEditar", "Servicio", new { id = item.idDato }, FormMethod.Get))
            {  <input type="image"  alt="0" title="Editar"  src="/Content/Images/edit.jpg" />
            }
        </div><div  style="float:right">
            @using (Html.BeginForm("Eliminar", "Servicio", new { id = item.idDato }, FormMethod.Get))
            {  <input type="image"  alt="0" title="Eliminar" src="/Content/Images/delete.jpg" />
            }
        </div>        
        </td>
    </tr>
}

</table>

    </fieldset>
}

<div>
    @Html.ActionLink("Back to List", "Index")
</div>
